package logic

import (
	"context"
	hotel "hotel_3.27/common/proto"
	"hotel_3.27/rpc/sever"
)

type ServiceHotel struct {
	hotel.UnimplementedHotelServer
}

func (s ServiceHotel) Login(ctx context.Context, in *hotel.LoginReq) (*hotel.LoginResp, error) {
	login, err := sever.Login(in)
	if err != nil {
		return nil, err
	}
	return login, nil
}

func (s ServiceHotel) SendSms(ctx context.Context, in *hotel.SendSmsReq) (*hotel.SendSmsResp, error) {
	sms, err := sever.SendSms(in)
	if err != nil {
		return nil, err
	}
	return sms, nil
}
func (s ServiceHotel) OrderAdd(ctx context.Context, in *hotel.OrderAddReq) (*hotel.OrderAddResp, error) {
	sms, err := sever.OrderAdd(in)
	if err != nil {
		return nil, err
	}
	return sms, nil
}

func (s ServiceHotel) OrderList(ctx context.Context, in *hotel.OrderListReq) (*hotel.OrderListResp, error) {
	sms, err := sever.OrderList(in)
	if err != nil {
		return nil, err
	}
	return sms, nil
}
